package com.moyun.search.controller;

import com.moyun.search.common.base.BaseController;
import com.moyun.search.common.result.PageVO;
import com.moyun.search.common.result.Result;
import com.moyun.search.domain.ProjectInfo;
import com.moyun.search.service.ProjectInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 项目信息接口
 * @author: zealon
 * @since: 2021/12/24
 */
@RequestMapping("project-info")
@RestController
public class ProjectInfoController extends BaseController {

    @Autowired
    private ProjectInfoService projectInfoService;

    @GetMapping("details")
    public Result details(Integer id){
        return this.projectInfoService.details(id);
    }

    @GetMapping("list")
    public PageVO<ProjectInfo> getListData(Integer limit, Integer page, Integer categoryId){
        return this.projectInfoService.getListData(limit, page, categoryId);
    }
}
